<template>
  <div>
    <p></p>
  </div>
</template>

<script>
export default {}
</script>

<style lang="less" scoped>
div {
  position: relative;
}
p {
  width: 50px;
  height: 50px;
  background-color: red;
  position: absolute;
  left: 0;
  top: 0;
}
@keyframes first {
  0% {
    // width: 50px;
    // height: 50px;
    opacity: 1;
    top: 0px;
  }
  50% {
    // width: 500px;
    // height: 500px;
    opacity: 0;
    top: 10px;
  }
   100% {
    // width: 500px;
    // height: 500px;
    opacity: 1;
    top: 0px;
  }
}
p:hover {
  animation: first 2s infinite;
}
</style>
